package com.xmotor.test_custom_component;

import com.alibaba.fastjson.JSONObject;
import com.demo.custom.component.service.ITestService;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @Description 自定义ITestService接口的实现
 * @Author Dang Xianyue
 * @Date 2020-09-09 23:13
 * @Version 1.0
 */
@Primary
@Service
public class CustomITestServiceImpl implements ITestService {
    @Override
    public void doSomethingA() {
        System.out.println("CustomITestServiceImpl");
    }

    @Override
    public Map<String, Object> doSomethingB() {
        JSONObject result = new JSONObject();
        result.put("id",10000);
        result.put("name","Jane");
        result.put("age",20);
        return result;
    }
}
